<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://upbase.com.cn/tags" prefix="shr" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<shr:html>
<shr:header></shr:header>
<% 
String ${tablePK} = request.getParameter("${tablePK}");
%>
<script type="text/javascript"> 
var _curUptUserInfo = ""; 
$(document).ready(function(){
	var url = '${r'${path}'}/${tableModel}/${tableAliasFistUpper}Action!get${tableAliasFistUpper}Info.action?${tablePK}=' + ${tablePK};
	AppKit.postJSON(url, "", showUserInfo);
});

function showInfo(json) {
	if (!AppKit.checkJSONResult(json)) {
		return;
	}	
	_curUptUserInfo = json.data;
	 for(var index in _curUptUserInfo){
		 $("#"+index).val(_curUptUserInfo[index]);
	}
	$("#updateform input").attr("disabled",true); 
	$("#updateform textarea").attr("disabled",true); 
	$("#updateform select").attr("disabled",true);
}
function updateSuccess(json){
	if(!AppKit.checkJSONResult(json)){
    	return;
    }
	AppKit.showMessage(json.message,"",function(){
		var data = AppKit.getOpenWinObj().window("options").data;
		if(data){
			data.datagrid("load");
		}
		
		parent.$('#detail_modal').window('close');	
		});
}

function closeWindow(){
	parent.$('#detail_modal').window('close');	
}
</script>
<table border="0" >
	<tr align="center">
		<td>
		  	<div id="addTab" class="easyui-tabs" style="width:520px;height:340px" >
            	<div title="基本信息" style="padding:10px;">
					<table border="0" width="100%" cellpadding="0" cellspacing="0"  style="border-collapse:collapse" class="viewdatagrid">
				        <#list listColumn as column >
							<#if column_index%3==0>
						<tr>	
							</#if>
							<th >${column.label}：</th>
							<#if column.isTextField>
								<input class="easyui-validatebox" id="${column.id}" name="${column.name}"  <#if column.required!="">required="true"</#if> validType="length[1,${column.length}]"/>
							</#if>
							<#if column.isTextArea>
								<textarea  class="easyui-validatebox"  id="${column.id}" name="${column.name}"  <#if column.required!="">required="true"</#if>  rows="3"/>
							</#if>
							<#if column.isSelect>
								<select   class="easyui-validatebox" id="${column.id}" name="${column.name}"   <#if column.required!="">required="true"</#if> />
							</#if>
							<#if (column_index+1)%3==0>
						</tr>	
							</#if>
						</#list>
						<#if listColumn?size%3!=0>
						</tr>	
						</#if>
					</table>
				</div>
				
				 
			</div>
		</td>	
	</tr>
	
	<tr>
		<td class="buttonline" style="text-align: center;padding: 10px 0px 10px 0px">
		    <a href="javascript:closeWindow()"  class="return" id="cancel"><span>取消</span></a>
		</td>
	</tr>
</table>
</shr:html>
